using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO
{
    /********************************BEGIN GiangVienLopTinChiDAO****************************************/
    ///<summary>
    /// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
    /// <para>Date:25/02/2012 41:11:06</para>
    /// <para>Class Name: GiangVienLopTinChiDAO</para>
    /// <para>Description: Class access to table GiangVienLopTinChi in database. Class for coder code here</para>
    ///</summary>


    public partial class GiangVienLopTinChiDAO
    {
        public DataSet SelectAllDSWithLopTinChiGiaoVienFilter(string filter)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = @"SELECT GiangVienLopTinChi.GiangVienLopTinChi_ID, GiangVienLopTinChi.GiangVien_ID, GiangVienLopTinChi.LopTinChi_ID, LopTinChi.MaLop, 
                      LopTinChi.NamHoc_ID, LopTinChi.HocKy_ID, LopTinChi.SoSVToiDa, LopTinChi.MonHoc_ID, LopTinChi.TrangThai, LopTinChi.Lop_ID, 
                      GiaoVien.MaGiaoVien, GiaoVien.HoTenGiaoVien
                    FROM         
                      LopTinChi INNER JOIN GiangVienLopTinChi  ON GiangVienLopTinChi.LopTinChi_ID = LopTinChi.LopTinChi_ID
                      INNER JOIN GiaoVien ON GiangVienLopTinChi.LopTinChi_ID = GiaoVien.GiaoVien_ID ";
            if (filter.Length > 0)
            {
                cmd.CommandText += " WHERE " + filter;
            }
            return this.SelectDS(cmd);
        }

    }
    /*****************************************************************************************************/
    /**********************************END GiangVienLopTinChiDAO*****************************************/
    /*****************************************************************************************************/
}

